package com.xhwl.data.controller;

import com.xhwl.common.dto.cent.sdata.RoomDTO;
import com.xhwl.common.pojo.ResultJson;
import com.xhwl.common.query.cent.sdata.RoomManageQuery;
import com.xhwl.data.service.IRoomManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Author yf
 * @Description:
 * @Date Create in 17:40 2022/06/13
 */
@RestController
public class RoomManageController {
    @Autowired
    private IRoomManageService roomManageService;

    @RequestMapping(value = "/room-manage/page", method = RequestMethod.POST)
    public ResultJson page(@RequestBody RoomManageQuery roomManageQuery) {
        Map<String, Object> map = roomManageService.page(roomManageQuery);
        return ResultJson.success(map);
    }

    @RequestMapping(value = "/room-manage/update", method = RequestMethod.POST)
    public ResultJson update(@RequestBody RoomDTO roomDTO) {
        return roomManageService.update(roomDTO);
    }
}
